﻿using Pulog.Models;
using System.Linq;
using System.Collections.Generic;

namespace Pulog.Models
{
    public partial class AttachmentRepository : IAttachmentRepository
    {

        private readonly PulogDataContext dc = new PulogDataContext();

        #region IAttachmentRepository Members

        public Attachment GetAttachmentByID(int id)
        {
            return dc.Attachments.Single(a => a.attachmentID == id);
        }

        public void Save()
        {
            dc.SubmitChanges();
        }

        #endregion
    }
}